package com.xhf.kl;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity implements View.OnClickListener{

    private TextView one,two,three,four,five,six;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        one= (TextView) findViewById(R.id.one);
        two= (TextView) findViewById(R.id.two);
        three= (TextView) findViewById(R.id.three);
        four= (TextView) findViewById(R.id.four);
        five= (TextView) findViewById(R.id.five);
        six= (TextView) findViewById(R.id.six);
        one.setOnClickListener(this);
        two.setOnClickListener(this);
        three.setOnClickListener(this);
        four.setOnClickListener(this);
        five.setOnClickListener(this);
        six.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        Intent intent;
        switch (v.getId()){
            case R.id.one:
                intent=new Intent(MainActivity.this,HomeActivity.class);
                startActivity(intent);
                break;
            case R.id.two:
                intent=new Intent(MainActivity.this,PeidaiActivity.class);
                startActivity(intent);
                break;
            case R.id.three:
                intent=new Intent(MainActivity.this,FinishActivity.class);
                startActivity(intent);
                break;
            case R.id.four:
                intent=new Intent(MainActivity.this,SetActivity.class);
                startActivity(intent);
                break;
            case R.id.five:
                intent=new Intent(MainActivity.this,FenxianActivity.class);
                startActivity(intent);
                break;
            case R.id.six:
                intent=new Intent(MainActivity.this,ChooseMoshiActivity.class);
                startActivity(intent);
                break;

        }
    }

//    CircularRingPercentageView progressCircle;
//
//    @Override
//    protected void onCreate(@Nullable Bundle savedInstanceState) {
//        super.onCreate(savedInstanceState);
//        setContentView(R.layout.main_test);
//        progressCircle = (CircularRingPercentageView) findViewById(R.id.progress);
//
//        SeekBar progressBar = (SeekBar) findViewById(R.id.progressBar2);
////        SeekBar progressBar5 = (SeekBar) findViewById(R.id.progressBar5);
////        SeekBar progressBar3 = (SeekBar) findViewById(R.id.progressBar3);
////        SeekBar progressBar4 = (SeekBar) findViewById(R.id.progressBar4);
////        progressBar4.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
////            @Override
////            public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
////                progressCircle.setMaxColorNumber(progress);
////            }
////
////            @Override
////            public void onStartTrackingTouch(SeekBar seekBar) {
////
////            }
////
////            @Override
////            public void onStopTrackingTouch(SeekBar seekBar) {
////
////            }
////        });
////        progressBar3.setMax(getWindowManager().getDefaultDisplay().getWidth());
////        progressBar5.setMax(progressCircle.getCircleWidth() / 2);
////
////        progressBar3.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
////            @Override
////            public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
////                LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) progressCircle.getLayoutParams();
////                layoutParams.width = progress;
////                layoutParams.height = progress;
////                progressCircle.setLayoutParams(layoutParams);
////                progressCircle.setCircleWidth(progress);
////            }
////
////            @Override
////            public void onStartTrackingTouch(SeekBar seekBar) {
////
////            }
////
////            @Override
////            public void onStopTrackingTouch(SeekBar seekBar) {
////
////            }
////        });
////        progressBar5.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
////            @Override
////            public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
////                progressCircle.setRoundWidth(progress);
////            }
////
////            @Override
////            public void onStartTrackingTouch(SeekBar seekBar) {
////
////            }
////
////            @Override
////            public void onStopTrackingTouch(SeekBar seekBar) {
////
////            }
////        });
////        CheckBox checkBox = (CheckBox) findViewById(R.id.line_scale_check);
////        checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
////            @Override
////            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
////                progressCircle.setLine(isChecked);
////            }
////        });
//        progressBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
//            @Override
//            public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
//                progressCircle.setProgress(progress, new CircularRingPercentageView.OnProgressScore() {
//                    @Override
//                    public void setProgressScore(float score) {
//                        Log.e("12", score + "");
//                    }
//                });
//            }
//
//            @Override
//            public void onStartTrackingTouch(SeekBar seekBar) {
//
//            }
//
//            @Override
//            public void onStopTrackingTouch(SeekBar seekBar) {
//
//            }
//        });
//
//        progressCircle.setProgress(50, new CircularRingPercentageView.OnProgressScore() {
//            @Override
//            public void setProgressScore(float score) {
//                Log.e("12", score + "");
//            }
//        });
//    }
}
